campaignvaccine
Table: campaignvaccine
The campaignvaccine table maps vaccines to campaigns, defining which vaccines are included in each campaign.
It is used to manage vaccine availability and track which vaccines are administered under a campaign.
Columns
| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| campaignVaccineId | int(11) | NOT NULL, AUTO_INCREMENT | Unique identifier for the campaign-vaccine mapping |
| campaignId | int(11) | NULL | References the campaign associated with the vaccine |
| vaccineId | smallint(6) | NULL | References the vaccine included in the campaign |
Indexes
- PRIMARY - Primary key on
campaignVaccineId - campaignvaccine_campaignId_campaign_campaignId_FK - Index on
campaignId - campaign_vaccineId_vaccine_vaccineId_FK - Index on
vaccineId
Foreign Key Relations
-
campaignvaccine_campaignId_campaign_campaignId_FK
campaignId→campaign.campaignId- Links the vaccine to its campaign
-
campaign_vaccineId_vaccine_vaccineId_FK
vaccineId→vaccine.vaccineId- Links the campaign to the specific vaccine
Usage Notes
- This table defines which vaccines are part of each campaign.
- Helps ensure children are administered only approved vaccines for a campaign.
- Supports reporting and analytics of vaccine distribution per campaign.
- Foreign keys maintain referential integrity with
campaignandvaccinetables.